using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.HomeRefinance
{
    public class HFPropertyDB
    {
        public HFPropertyDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(HFProperty property)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFPropertyInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@HFPropertyID", property.HFPropertyID);
            _sPara.Add("@HFPersonnelID", property.HFPersonnelID);
            _sPara.Add("@HFID", property.HFID);
            _sPara.Add("@HFPropertyPrice", property.HFPropertyPrice);
            _sPara.Add("@HFPurchaseDate", property.HFPurchaseDate);
            _sPara.Add("@HFPostCode", property.HFPostCode);
            _sPara.Add("@HFBHNo", property.HFBHNo);
            _sPara.Add("@HFHomeNo", property.HFHomeNo);
            _sPara.Add("@HFStreetName", property.HFStreetName);
            _sPara.Add("@HFPropertyType", property.HFPropertyType);
            _sPara.Add("@HFForWhat", property.HFForWhat);
            _sPara.Add("@HFExpRentalAmount", property.HFExpRentalAmount);
            _sPara.Add("@HFCompleteStatus", property.HFCompleteStatus);
            _sPara.Add("@HFTOPDate", property.HFTOPDate);
            _sPara.Add("@HFLeasePropertyType", property.HFLeasePropertyType);
            _sPara.Add("@HFLeaseHold", property.HFLeaseHold);
            _sPara.Add("@HFIsRenovate", property.HFIsRenovate);
            _sPara.Add("@HFRenovateAmount", property.HFRenovateAmount);
            _sPara.Add("@HFIsLanded", property.HFIsLanded);
            _sPara.Add("@HFLandArea", property.HFLandArea);
            _sPara.Add("@HFLandAreaUnit", property.HFLandAreaUnit);
            _sPara.Add("@HFBuiltArea", property.HFBuiltArea);
            _sPara.Add("@HFBuiltAreaUnit", property.HFBuiltAreaUnit);
            _sPara.Add("@RefCEUserId", property.RefCEUserId);
            _sPara.Add("@ViewedDetailId", property.ViewedDetailId);
            _sPara.Add("@Status", property.Status);
            _sPara.Add("@Info1", property.Info1);
            _sPara.Add("@Info2", property.Info2);
            _sPara.Add("@Info3", property.Info3);
            _sPara.Add("@Info4", property.Info4);
            _sPara.Add("@Info5", property.Info5);
            _sPara.Add("@Info6", property.Info6);
            _sPara.Add("@Info7", property.Info7);
            _sPara.Add("@Info8", property.Info8);
            _sPara.Add("@Info9", property.Info9);
            _sPara.Add("@Info10", property.Info10);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }

    }
}